//
//  FirstPageSecondTableViewCell.m
//  BSLCar
//
//  Created by dlios on 15/5/23.
//  Copyright (c) 2015年 lyz. All rights reserved.
//

#import "FirstPageSecondTableViewCell.h"

@implementation FirstPageSecondTableViewCell

- (void)awakeFromNib {
    // Initialization code
}

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        [self createView];
    }
    return self;
}

- (void)createView {
    self.carNameLabel = [[UILabel alloc] init];
    [self.contentView addSubview:self.carNameLabel];
    
    self.img = [[UIImageView alloc] init];
    [self.contentView addSubview:self.img];
    
    self.priceLabel = [[UILabel alloc] init];
    [self.contentView addSubview:self.priceLabel];
    
    self.saletimeLabel = [[UILabel alloc] init];
    [self.contentView addSubview:self.saletimeLabel];
}

- (void)layoutSubviews {
    [super layoutSubviews];
    
//    self.backgroundColor = [UIColor colorWithRed:0.9 green:.9 blue:.9 alpha:1];
    
    self.img.frame = CGRectMake(10, 5, 150 - 20, 100 - 10);
    self.img.layer.cornerRadius = 3;
    self.img.layer.masksToBounds = YES;
    self.img.contentMode = UIViewContentModeScaleAspectFit;
    
    self.carNameLabel.frame = CGRectMake(150, 7, self.bounds.size.width - 150, 20);

    
    self.priceLabel.frame = CGRectMake(150, 42.5, self.bounds.size.width - 150, 20);
    self.priceLabel.textColor = [UIColor redColor];
    
    self.saletimeLabel.frame = CGRectMake(150, 62, self.bounds.size.width - 150, 100 - 55);

    
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
